package gov.pbc.nn.kjgl.task.handler;

import org.springframework.stereotype.Component;

import com.bstek.uflo.env.Context;
import com.bstek.uflo.model.ProcessInstance;
import com.bstek.uflo.process.handler.NodeEventHandler;
import com.bstek.uflo.process.node.Node;

@Component(CollectOpinionNodeEventHandler.BEAN_ID)
public class CollectOpinionNodeEventHandler implements NodeEventHandler {

	public static final String BEAN_ID = "gov.pbc.nn.kjgl.task.handler.CollectOpinionNodeEventHandler";
	@Override
	public void enter(Node arg0, ProcessInstance arg1, Context arg2) {

	}

	@Override
	public void leave(Node arg0, ProcessInstance arg1, Context arg2) {
		arg2.getProcessService().saveProcessVariable(arg1.getId(),
				"hasCollected", true);
	}

}
